Skip to content

StateSignal class

Attributes: [DebuggerDisplay("{DebuggerDisplay,nq}")]

Defined in

Namespace: ReactiveUI.Primitives.Signals Assembly: ReactiveUI.Primitives.Core.dll Full name: ReactiveUI.Primitives.Signals.StateSignal<T> Modifiers: public sealed

Summary

View source

Mutable latest-value signal with a ReactiveUI.Primitives name for reactive-property parity.

Applies to

net10.0, net10.0, net10.0-desktop1.0, net10.0-desktop1.0, net10.0-browserwasm1.0, net10.0-browserwasm1.0, net9.0, net9.0, net9.0-desktop1.0, net9.0-desktop1.0, net9.0-browserwasm1.0, net9.0-browserwasm1.0, net8.0, net8.0, net8.0-ios17.5, net8.0-macos14.5, net8.0-macos14.5, net8.0-macos14.2, net8.0-macos14.2, net8.0-maccatalyst17.5, net8.0-maccatalyst17.5, net8.0-tvos17.2, net8.0-tvos17.2, net8.0-ios17.5, netstandard2.1, netstandard2.1, net481, net462, net462, net481

Class hierarchy
classDiagram
class StateSignal~T~
class ISignal~T~ {
    <>
}
ISignal~T~ <|.. StateSignal~T~
class ISignal~T, T~ {
    <>
}
ISignal~T, T~ <|.. StateSignal~T~
class IObserver~T~ {
    <>
}
IObserver~T~ <|.. StateSignal~T~
class IObservable~T~ {
    <>
}
IObservable~T~ <|.. StateSignal~T~
class IsDisposed {
    <>
}
IsDisposed <|.. StateSignal~T~
class IDisposable {
    <>
}
IDisposable <|.. StateSignal~T~
class IWitnessRemovable~T~ {
    <>
}
IWitnessRemovable~T~ <|.. StateSignal~T~

Implements: ISignal, ISignal, IObserver, IObservable, IsDisposed, IDisposable, IWitnessRemovable<T>

Constructors

NameSummary
.ctorInitializes a new instance of the [StateSignal](# class.

Properties

NameSummary
ChangedGets the observable stream of current and subsequent values.
ValueGets or sets the current value. Setting the value notifies observers even when equal to the previous value.
HasObserversGets a value indicating whether this instance has observers.
IsDisposedGets a value indicating whether this instance is disposed.

Methods

NameSummary
TryGetValueTries to get the current value, returning false when disposed.
OnCompletedNotifies all subscribed observers about the end of the sequence.
OnErrorNotifies all subscribed observers about the exception.
OnNextNotifies all subscribed observers about the arrival of the specified element in the sequence.
SubscribeSubscribes an observer to the signal.
DisposeReleases the signal's observers and cached state.
RefreshEmits the current value again without changing it.
ToReadOnlyStateCreates a read-only projected state view that tracks this state until disposed.
Inherited members